<?php
namespace sms;

/**
 * Class SmsManager
 * @package sms
 */
class SmsManager
{
    /**
     * 返回相应的短信单列
     * @return template\Sms|text\Sms|null
     */
    public static function getInstance()
    {
        $type = config('sms.type');
        switch ($type){
            case 'text':
                $sms = \sms\text\Sms::getInstance();
                break;
            case 'template':
                $sms = \sms\template\Sms::getInstance();
                break;
            default:
                $sms = \sms\text\Sms::getInstance();
                break;
        }
        return  $sms;
    }
}